from datetime import datetime
from time import mktime
from wsgiref.handlers import format_date_time

cur_time = datetime.now()
date = format_date_time(mktime(cur_time.timetuple()))
print(date)
# 假使生成的date和下方使用的date = Fri, 05 May 2023 10:43:39 GMT